#pragma once
#include <fstream>
#include <string.h>
#include "Place.h"
#include "mytool.h"

class PlaceManger
{
public:
	PlaceManger(void);
	~PlaceManger(void);
	void Add(Place);
    void AddNew(Place);
	void Del(char *);
    void Edit(char *,Place);
    void Edit(char *,int);
    int Search(char *);
    Place* List(int&);
    int count();
    int realCount();
    pathNode *BFS(int x1,int y1,int x2,int y2,int &length);
    gjlx *GJPlan(int,int,int,int,int&);
    char*getPlaceName(int,int);
    gjlx *GJMinStopPlan(int,int,int,int,int&);
    Place getPalceByName(char *);
private:
	Place *places;
	char file[50];
    pathNode *path;
    Place *placeMap[50][50];
};

